{% extends "../../../layui/layouts/blank.html" %}

{% block mainbody %}
<div class="view-block">
    <table class="layui-table">
        <tbody>
        <tr>
            <td>上报编号</td>
            <td>{{report.number}}</td>
        </tr>
        <tr>
            <td>产品名称</td>
            <td>{{report.produce_name}}</td>
        </tr>
        <tr>
            <td>公司名称</td>
            <td>{{report.company_name}}</td>
        </tr>
        <tr>
            <td>上报时间</td>
            <td>{{report.reported_at}}</td>
        </tr>
        <tr>
            <td>上报人</td>
            <td>{{report.username}}</td>
        </tr>
        <tr>
            <td>上报单位</td>
            <td>{{report.unit}}</td>
        </tr>
        <tr>
            <td>所属地区</td>
            <td>{{report.address}}</td>
        </tr>
        <tr>
            <td>联系电话</td>
            <td>{{report.phone}}</td>
        </tr>
        <tr>
            <td>风险描述</td>
            <td>
                <table >
                    {% for key, item in  report.risk_desc %}
                    <tr>
                        <td>{{key}}</td>
                        <td>
                            <table>
                                {% for v in item %}
                                {% if v.AnnexType == 0 %}
                                <tr><td>{{v.Src}}</td></tr>
                                {% elif v.AnnexType == 1 %}
                                <tr><td><img src="/{{v.Src}}" alt=""></td></tr>
                                {% elif v.AnnexType == 2 %}
                                <tr><td><a href="/{{v.Src}}" alt="">下载word</a></td></tr>
                                {% elif v.AnnexType == 3 %}
                                <tr><td><a href="/{{v.Src}}" alt="">下载pdf</a></td></tr>
                                {% endif %}
                                {% endfor %}
                            </table>

                        </td>
                    </tr>
                    {% endfor %}
                </table>
            </td>
        </tr>
        <tr>
            <td>风险分析</td>
            <td>
                <table >
                    {% for key, item in  report.risk_analysis %}
                    <tr>
                        <td>{{key}}</td>
                        <td>
                            <table>
                                {% for v in item %}
                                {% if v.AnnexType == 0 %}
                                <tr><td>{{v.Src}}</td></tr>
                                {% elif v.AnnexType == 1 %}
                                <tr><td><img src="/{{v.Src}}" alt=""></td></tr>
                                {% elif v.AnnexType == 2 %}
                                <tr><td><a href="/{{v.Src}}" alt="">下载word</a></td></tr>
                                {% elif v.AnnexType == 3 %}
                                <tr><td><a href="/{{v.Src}}" alt="">下载pdf</a></td></tr>
                                {% endif %}
                                {% endfor %}
                            </table>

                        </td>
                    </tr>
                    {% endfor %}
                </table>
            </td>
        </tr>

        </tbody>
    </table>
</div>
{% endblock %}
